package base.prototype.framework;

import java.util.HashMap;

/**
 * @program: DesignPatterns
 * @description: 产生具体的类，维护多重对象
 * @author: Mr.Dai
 * @create: 2018-05-28 21:31
 **/
public class Manager {
    private HashMap<String,Product> warehouse=new HashMap<>();

    public void registers(String name,Product product){
        warehouse.put(name,product);
    }

    public Product createObj(String name){
        Product product = warehouse.get(name);
        return product.createClone();
    }
}
